package com.adee.java.reflect;

import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;

public class Test001_Reflect {
    public static void main(String[] args) throws NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException {
        Constructor<User> con = User.class.getConstructor();
        User u = con.newInstance();
        System.out.println(u.name);
    }
    
    static class User {
        public User() {

        }
        String name = "Jack";
    }
}
